package net.service.impl;

import net.dao.GridAndBackgroundDao;
import net.form.processing.HSVRangeGridAndBackground;
import net.model.GridAndBackground;
import net.service.GridAndBackgroundManager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class GridAndBackgroundManagerImpl implements GridAndBackgroundManager {

	@Autowired
	private GridAndBackgroundDao gridAndBackgroundDao;

	@Transactional
	public GridAndBackground getGridAndBackground() {
		return gridAndBackgroundDao.getGridAndBackground();
	}

	@Transactional
	public double getSizeGridReference() {
		return  gridAndBackgroundDao.getSizeGridReference();
	}

	@Transactional
	public void setSizeGridReference(double longitud) {
		gridAndBackgroundDao.setSizeGridReference(longitud);
	}
	
	@Transactional
	public void setHSVRangeGridAndBackground(
			HSVRangeGridAndBackground rangeGridAndBackground) {
		gridAndBackgroundDao
				.setHSVRangeGridAndBackground(rangeGridAndBackground);
	}

	@Transactional
	public GridAndBackground findConfiguracion(String nombreSistema) {
		return gridAndBackgroundDao.findConfiguracion(nombreSistema);
	}

	@Transactional
	public void setSeparationOfObjects(boolean separationOfObjects) {
		gridAndBackgroundDao.setSeparationOfObjects(separationOfObjects);
	}
	
}
